﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Compilation;
using System.Resources;
using System.Globalization;
using System.Reflection;

/// <summary>
/// Summary description for ResourceProviderFactory
/// </summary>
namespace MikeKappel.Com.CS.Resources
{
    /// <summary>
    /// Summary description for ResourceProvider
    /// </summary>
    public class MkResourceProvider : IResourceProvider
    {
        String _name;

        public MkResourceProvider(String name)
        {
            _name = name;
        }


        Object IResourceProvider.GetObject(String resourceKey, CultureInfo culture)
        {
            String cultureName = (culture == null) ? CultureInfo.CurrentUICulture.Name : culture.Name;
            return "Place holder for Database logic " + resourceKey + " " + cultureName + " " + _name; //Place holder for Database logic
        }


        IResourceReader IResourceProvider.ResourceReader
        {
            get
            {
                String cultureName = null;
                CultureInfo currentUICulture = CultureInfo.CurrentUICulture;
                if (!String.Equals(currentUICulture.Name, CultureInfo.InstalledUICulture.Name))
                    cultureName = currentUICulture.Name;

                return new MkResourceReader(new Hashtable());//Place holder for Database logic
            }
        }
    }
}

